using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VEKREKOPF
    {
        public DataRow Convert2EKREKOPF(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryEKREKOPF(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["EKRKMANDANT"] = " ".PadRight(2 ); 
         dwReturn["EKRKLIEFNR"] = " ".PadRight(8 ); 
         dwReturn["EKRKRENR"] = " ".PadRight(10 ); 
         dwReturn["EKRKAENZL"] = " ".PadRight(0 ); 
         dwReturn["EKRKAENB"] = " ".PadRight(8 ); 
         dwReturn["EKRKAEND"] = " ".PadRight(0 ); 
         dwReturn["EKRKNEUB"] = " ".PadRight(8 ); 
         dwReturn["EKRKNEUD"] = " ".PadRight(0 ); 
         dwReturn["EKRKRGDAT"] = " ".PadRight(0 ); 
         dwReturn["EKRKSTA"] = " ".PadRight(1 ); 
         dwReturn["EKRKLIEFNRB"] = " ".PadRight(8 ); 
         dwReturn["EKRKKONDSL"] = " ".PadRight(4 ); 
         dwReturn["EKRKADRSL"] = " ".PadRight(4 ); 
         dwReturn["EKRKWAEHRSL"] = " ".PadRight(3 ); 
         dwReturn["EKRKZAHLBED"] = " ".PadRight(3 ); 
         dwReturn["EKRKSTDZZ"] = " ".PadRight(1 ); 
         dwReturn["EKRKVADAT"] = " ".PadRight(0 ); 
         dwReturn["EKRKVALUTA"] = " ".PadRight(0 ); 
         dwReturn["EKRKWERTDAT"] = " ".PadRight(0 ); 
         dwReturn["EKRKNETGEW"] = " ".PadRight(0 ); 
         dwReturn["EKRKBRUTGEW"] = " ".PadRight(0 ); 
         dwReturn["EKRKNETWERT"] = " ".PadRight(0 ); 
         dwReturn["EKRKVERPAB"] = " ".PadRight(0 ); 
         dwReturn["EKRKFRAAB"] = " ".PadRight(0 ); 
         dwReturn["EKRKVERSAB"] = " ".PadRight(0 ); 
         dwReturn["EKRKZOLLAB"] = " ".PadRight(0 ); 
         dwReturn["EKRKPACKM"] = " ".PadRight(0 ); 
         dwReturn["EKRKRGWERT"] = " ".PadRight(0 ); 
         dwReturn["EKRKSTFREI"] = " ".PadRight(0 ); 
         dwReturn["EKRKMWSTSL"] = " ".PadRight(3 ); 
         dwReturn["EKRKMWSTP"] = " ".PadRight(0 ); 
         dwReturn["EKRKMWST"] = " ".PadRight(0 ); 
         dwReturn["EKRKSKTWERT"] = " ".PadRight(0 ); 
         dwReturn["EKRKSKTBETR"] = " ".PadRight(0 ); 
         dwReturn["EKRKZUABK"] = " ".PadRight(0 ); 
         dwReturn["EKRKZUAB"] = " ".PadRight(0 ); 
         dwReturn["EKRKRABATT"] = " ".PadRight(0 ); 
         dwReturn["EKRKFIXBONA"] = " ".PadRight(0 ); 
         dwReturn["EKRKFIBUDAT"] = " ".PadRight(0 ); 
         dwReturn["EKRKFIBUBELEG"] = " ".PadRight(0 ); 
         dwReturn["EKRKABRECHKZ"] = " ".PadRight(1 ); 
         dwReturn["EKRKUEBKZ"] = " ".PadRight(1 ); 
         dwReturn["EKRKABLAGE"] = " ".PadRight(2 ); 
         dwReturn["EKRKBELEG"] = " ".PadRight(6 ); 
         dwReturn["EKRKSCBENID"] = " ".PadRight(8 ); 
         dwReturn["EKRKSCDAT"] = " ".PadRight(0 ); 
         dwReturn["EKRKUEBBEL"] = " ".PadRight(1 ); 
         dwReturn["EKRKBUCHKRS"] = " ".PadRight(3 ); 
         dwReturn["EKRKELSRE"] = " ".PadRight(1 ); 
         dwReturn["EKRKREART"] = " ".PadRight(2 ); 
         dwReturn["EKRKRRENR"] = " ".PadRight(10 ); 
         dwReturn["EKRKARTGR"] = " ".PadRight(1 ); 
         dwReturn["EKRKSKTPR"] = " ".PadRight(4 ); 
         dwReturn["EKRKRADRSL"] = " ".PadRight(8 ); 
         dwReturn["EKRKHWAEHRSL"] = " ".PadRight(3 ); 
         dwReturn["EKRKKURS"] = " ".PadRight(0 ); 
         dwReturn["EKRKBETRAG"] = " ".PadRight(0 ); 
         dwReturn["EKRKHEUROKURS"] = " ".PadRight(0 ); 
         dwReturn["EKRKHEUKURSVK"] = " ".PadRight(1 ); 
         dwReturn["EKRKFEUROKURS"] = " ".PadRight(0 ); 
         dwReturn["EKRKFEUKURSVK"] = " ".PadRight(1 ); 
         dwReturn["EKRKLDCOST"] = " ".PadRight(1 ); 
         dwReturn["EKRKLDCOAM"] = " ".PadRight(0 ); 
         dwReturn["EKRKBELWERT"] = " ".PadRight(0 ); 
         dwReturn["EKRKLSRENR"] = " ".PadRight(30 ); 
         dwReturn["EKRKFILLER"] = " ".PadRight(25 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapEKREKOPF(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveEKREKOPF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryEKREKOPF(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapEKREKOPF(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertEKREKOPF(dwLocal, ITXDBVERSION);
            }
            UpdateEKREKOPF(dwLocal);
        }
        public void InsertEKREKOPF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO EKREKOPF(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryEKREKOPF(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM EKREKOPF WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM EKREKOPF  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "EKREKOPF";
            Return = Result;
            return Return;
        }
        public void DeleteEKREKOPF(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM EKREKOPF   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateEKREKOPF(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE EKREKOPF SET "
                    +"EKRKMANDANT= :EKRKMANDANT,"
                    +"EKRKLIEFNR= :EKRKLIEFNR,"
                    +"EKRKRENR= :EKRKRENR,"
                    +"EKRKAENZL= :EKRKAENZL,"
                    +"EKRKAENB= :EKRKAENB,"
                    +"EKRKAEND= :EKRKAEND,"
                    +"EKRKNEUB= :EKRKNEUB,"
                    +"EKRKNEUD= :EKRKNEUD,"
                    +"EKRKRGDAT= :EKRKRGDAT,"
                    +"EKRKSTA= :EKRKSTA,"
                    +"EKRKLIEFNRB= :EKRKLIEFNRB,"
                    +"EKRKKONDSL= :EKRKKONDSL,"
                    +"EKRKADRSL= :EKRKADRSL,"
                    +"EKRKWAEHRSL= :EKRKWAEHRSL,"
                    +"EKRKZAHLBED= :EKRKZAHLBED,"
                    +"EKRKSTDZZ= :EKRKSTDZZ,"
                    +"EKRKVADAT= :EKRKVADAT,"
                    +"EKRKVALUTA= :EKRKVALUTA,"
                    +"EKRKWERTDAT= :EKRKWERTDAT,"
                    +"EKRKNETGEW= :EKRKNETGEW,"
                    +"EKRKBRUTGEW= :EKRKBRUTGEW,"
                    +"EKRKNETWERT= :EKRKNETWERT,"
                    +"EKRKVERPAB= :EKRKVERPAB,"
                    +"EKRKFRAAB= :EKRKFRAAB,"
                    +"EKRKVERSAB= :EKRKVERSAB,"
                    +"EKRKZOLLAB= :EKRKZOLLAB,"
                    +"EKRKPACKM= :EKRKPACKM,"
                    +"EKRKRGWERT= :EKRKRGWERT,"
                    +"EKRKSTFREI= :EKRKSTFREI,"
                    +"EKRKMWSTSL= :EKRKMWSTSL,"
                    +"EKRKMWSTP= :EKRKMWSTP,"
                    +"EKRKMWST= :EKRKMWST,"
                    +"EKRKSKTWERT= :EKRKSKTWERT,"
                    +"EKRKSKTBETR= :EKRKSKTBETR,"
                    +"EKRKZUABK= :EKRKZUABK,"
                    +"EKRKZUAB= :EKRKZUAB,"
                    +"EKRKRABATT= :EKRKRABATT,"
                    +"EKRKFIXBONA= :EKRKFIXBONA,"
                    +"EKRKFIBUDAT= :EKRKFIBUDAT,"
                    +"EKRKFIBUBELEG= :EKRKFIBUBELEG,"
                    +"EKRKABRECHKZ= :EKRKABRECHKZ,"
                    +"EKRKUEBKZ= :EKRKUEBKZ,"
                    +"EKRKABLAGE= :EKRKABLAGE,"
                    +"EKRKBELEG= :EKRKBELEG,"
                    +"EKRKSCBENID= :EKRKSCBENID,"
                    +"EKRKSCDAT= :EKRKSCDAT,"
                    +"EKRKUEBBEL= :EKRKUEBBEL,"
                    +"EKRKBUCHKRS= :EKRKBUCHKRS,"
                    +"EKRKELSRE= :EKRKELSRE,"
                    +"EKRKREART= :EKRKREART,"
                    +"EKRKRRENR= :EKRKRRENR,"
                    +"EKRKARTGR= :EKRKARTGR,"
                    +"EKRKSKTPR= :EKRKSKTPR,"
                    +"EKRKRADRSL= :EKRKRADRSL,"
                    +"EKRKHWAEHRSL= :EKRKHWAEHRSL,"
                    +"EKRKKURS= :EKRKKURS,"
                    +"EKRKBETRAG= :EKRKBETRAG,"
                    +"EKRKHEUROKURS= :EKRKHEUROKURS,"
                    +"EKRKHEUKURSVK= :EKRKHEUKURSVK,"
                    +"EKRKFEUROKURS= :EKRKFEUROKURS,"
                    +"EKRKFEUKURSVK= :EKRKFEUKURSVK,"
                    +"EKRKLDCOST= :EKRKLDCOST,"
                    +"EKRKLDCOAM= :EKRKLDCOAM,"
                    +"EKRKBELWERT= :EKRKBELWERT,"
                    +"EKRKLSRENR= :EKRKLSRENR,"
                    +"EKRKFILLER= :EKRKFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("EKRKMANDANT", OracleType.NVarChar).Value = dwData["EKRKMANDANT"].ToString(); 
          or1.Parameters.Add("EKRKLIEFNR", OracleType.NVarChar).Value = dwData["EKRKLIEFNR"].ToString(); 
          or1.Parameters.Add("EKRKRENR", OracleType.NVarChar).Value = dwData["EKRKRENR"].ToString(); 
          or1.Parameters.Add("EKRKAENZL", OracleType.NVarChar).Value = dwData["EKRKAENZL"].ToString(); 
          or1.Parameters.Add("EKRKAENB", OracleType.NVarChar).Value = dwData["EKRKAENB"].ToString(); 
          or1.Parameters.Add("EKRKAEND", OracleType.NVarChar).Value = dwData["EKRKAEND"].ToString(); 
          or1.Parameters.Add("EKRKNEUB", OracleType.NVarChar).Value = dwData["EKRKNEUB"].ToString(); 
          or1.Parameters.Add("EKRKNEUD", OracleType.NVarChar).Value = dwData["EKRKNEUD"].ToString(); 
          or1.Parameters.Add("EKRKRGDAT", OracleType.NVarChar).Value = dwData["EKRKRGDAT"].ToString(); 
          or1.Parameters.Add("EKRKSTA", OracleType.NVarChar).Value = dwData["EKRKSTA"].ToString(); 
          or1.Parameters.Add("EKRKLIEFNRB", OracleType.NVarChar).Value = dwData["EKRKLIEFNRB"].ToString(); 
          or1.Parameters.Add("EKRKKONDSL", OracleType.NVarChar).Value = dwData["EKRKKONDSL"].ToString(); 
          or1.Parameters.Add("EKRKADRSL", OracleType.NVarChar).Value = dwData["EKRKADRSL"].ToString(); 
          or1.Parameters.Add("EKRKWAEHRSL", OracleType.NVarChar).Value = dwData["EKRKWAEHRSL"].ToString(); 
          or1.Parameters.Add("EKRKZAHLBED", OracleType.NVarChar).Value = dwData["EKRKZAHLBED"].ToString(); 
          or1.Parameters.Add("EKRKSTDZZ", OracleType.NVarChar).Value = dwData["EKRKSTDZZ"].ToString(); 
          or1.Parameters.Add("EKRKVADAT", OracleType.NVarChar).Value = dwData["EKRKVADAT"].ToString(); 
          or1.Parameters.Add("EKRKVALUTA", OracleType.NVarChar).Value = dwData["EKRKVALUTA"].ToString(); 
          or1.Parameters.Add("EKRKWERTDAT", OracleType.NVarChar).Value = dwData["EKRKWERTDAT"].ToString(); 
          or1.Parameters.Add("EKRKNETGEW", OracleType.NVarChar).Value = dwData["EKRKNETGEW"].ToString(); 
          or1.Parameters.Add("EKRKBRUTGEW", OracleType.NVarChar).Value = dwData["EKRKBRUTGEW"].ToString(); 
          or1.Parameters.Add("EKRKNETWERT", OracleType.NVarChar).Value = dwData["EKRKNETWERT"].ToString(); 
          or1.Parameters.Add("EKRKVERPAB", OracleType.NVarChar).Value = dwData["EKRKVERPAB"].ToString(); 
          or1.Parameters.Add("EKRKFRAAB", OracleType.NVarChar).Value = dwData["EKRKFRAAB"].ToString(); 
          or1.Parameters.Add("EKRKVERSAB", OracleType.NVarChar).Value = dwData["EKRKVERSAB"].ToString(); 
          or1.Parameters.Add("EKRKZOLLAB", OracleType.NVarChar).Value = dwData["EKRKZOLLAB"].ToString(); 
          or1.Parameters.Add("EKRKPACKM", OracleType.NVarChar).Value = dwData["EKRKPACKM"].ToString(); 
          or1.Parameters.Add("EKRKRGWERT", OracleType.NVarChar).Value = dwData["EKRKRGWERT"].ToString(); 
          or1.Parameters.Add("EKRKSTFREI", OracleType.NVarChar).Value = dwData["EKRKSTFREI"].ToString(); 
          or1.Parameters.Add("EKRKMWSTSL", OracleType.NVarChar).Value = dwData["EKRKMWSTSL"].ToString(); 
          or1.Parameters.Add("EKRKMWSTP", OracleType.NVarChar).Value = dwData["EKRKMWSTP"].ToString(); 
          or1.Parameters.Add("EKRKMWST", OracleType.NVarChar).Value = dwData["EKRKMWST"].ToString(); 
          or1.Parameters.Add("EKRKSKTWERT", OracleType.NVarChar).Value = dwData["EKRKSKTWERT"].ToString(); 
          or1.Parameters.Add("EKRKSKTBETR", OracleType.NVarChar).Value = dwData["EKRKSKTBETR"].ToString(); 
          or1.Parameters.Add("EKRKZUABK", OracleType.NVarChar).Value = dwData["EKRKZUABK"].ToString(); 
          or1.Parameters.Add("EKRKZUAB", OracleType.NVarChar).Value = dwData["EKRKZUAB"].ToString(); 
          or1.Parameters.Add("EKRKRABATT", OracleType.NVarChar).Value = dwData["EKRKRABATT"].ToString(); 
          or1.Parameters.Add("EKRKFIXBONA", OracleType.NVarChar).Value = dwData["EKRKFIXBONA"].ToString(); 
          or1.Parameters.Add("EKRKFIBUDAT", OracleType.NVarChar).Value = dwData["EKRKFIBUDAT"].ToString(); 
          or1.Parameters.Add("EKRKFIBUBELEG", OracleType.NVarChar).Value = dwData["EKRKFIBUBELEG"].ToString(); 
          or1.Parameters.Add("EKRKABRECHKZ", OracleType.NVarChar).Value = dwData["EKRKABRECHKZ"].ToString(); 
          or1.Parameters.Add("EKRKUEBKZ", OracleType.NVarChar).Value = dwData["EKRKUEBKZ"].ToString(); 
          or1.Parameters.Add("EKRKABLAGE", OracleType.NVarChar).Value = dwData["EKRKABLAGE"].ToString(); 
          or1.Parameters.Add("EKRKBELEG", OracleType.NVarChar).Value = dwData["EKRKBELEG"].ToString(); 
          or1.Parameters.Add("EKRKSCBENID", OracleType.NVarChar).Value = dwData["EKRKSCBENID"].ToString(); 
          or1.Parameters.Add("EKRKSCDAT", OracleType.NVarChar).Value = dwData["EKRKSCDAT"].ToString(); 
          or1.Parameters.Add("EKRKUEBBEL", OracleType.NVarChar).Value = dwData["EKRKUEBBEL"].ToString(); 
          or1.Parameters.Add("EKRKBUCHKRS", OracleType.NVarChar).Value = dwData["EKRKBUCHKRS"].ToString(); 
          or1.Parameters.Add("EKRKELSRE", OracleType.NVarChar).Value = dwData["EKRKELSRE"].ToString(); 
          or1.Parameters.Add("EKRKREART", OracleType.NVarChar).Value = dwData["EKRKREART"].ToString(); 
          or1.Parameters.Add("EKRKRRENR", OracleType.NVarChar).Value = dwData["EKRKRRENR"].ToString(); 
          or1.Parameters.Add("EKRKARTGR", OracleType.NVarChar).Value = dwData["EKRKARTGR"].ToString(); 
          or1.Parameters.Add("EKRKSKTPR", OracleType.NVarChar).Value = dwData["EKRKSKTPR"].ToString(); 
          or1.Parameters.Add("EKRKRADRSL", OracleType.NVarChar).Value = dwData["EKRKRADRSL"].ToString(); 
          or1.Parameters.Add("EKRKHWAEHRSL", OracleType.NVarChar).Value = dwData["EKRKHWAEHRSL"].ToString(); 
          or1.Parameters.Add("EKRKKURS", OracleType.NVarChar).Value = dwData["EKRKKURS"].ToString(); 
          or1.Parameters.Add("EKRKBETRAG", OracleType.NVarChar).Value = dwData["EKRKBETRAG"].ToString(); 
          or1.Parameters.Add("EKRKHEUROKURS", OracleType.NVarChar).Value = dwData["EKRKHEUROKURS"].ToString(); 
          or1.Parameters.Add("EKRKHEUKURSVK", OracleType.NVarChar).Value = dwData["EKRKHEUKURSVK"].ToString(); 
          or1.Parameters.Add("EKRKFEUROKURS", OracleType.NVarChar).Value = dwData["EKRKFEUROKURS"].ToString(); 
          or1.Parameters.Add("EKRKFEUKURSVK", OracleType.NVarChar).Value = dwData["EKRKFEUKURSVK"].ToString(); 
          or1.Parameters.Add("EKRKLDCOST", OracleType.NVarChar).Value = dwData["EKRKLDCOST"].ToString(); 
          or1.Parameters.Add("EKRKLDCOAM", OracleType.NVarChar).Value = dwData["EKRKLDCOAM"].ToString(); 
          or1.Parameters.Add("EKRKBELWERT", OracleType.NVarChar).Value = dwData["EKRKBELWERT"].ToString(); 
          or1.Parameters.Add("EKRKLSRENR", OracleType.NVarChar).Value = dwData["EKRKLSRENR"].ToString(); 
          or1.Parameters.Add("EKRKFILLER", OracleType.NVarChar).Value = dwData["EKRKFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
